HAL I2S migration: List of applicable concepts ¶
This section provides information about the HAL I2S applicable architecture concepts.
Concepts for I2S ¶
|
Concept |
Description |
|---|---|
|
The initialization has been split into separate initialization and configuration functions:
|
|
|
Removal and conversion of init structure to configuration structure |
The initialization structure has been removed and moved into
|
|
The handle structure has been renamed to
|
|
|
|
|
|
Two functions to get and set user data are available
|
|
|
New APIs are available to get and set I2S features. |
|
|
Individual callback registration APIs replace global register and unregister functions |
The callback registration is handled by specific functions for each I2S event. These functions are used to register callback functions for different I2S events. |
|
HAL I2S APIs now rely on LL APIs rather than performing direct register access. |
|
|
Define statements and enumerations redirected to LL equivalents |
HAL I2S define statements and enumerations are based on LL define statements. |
|
All hardware macros have been removed from the HAL I2S driver, and equivalent services are ensured through the LL APIs. |
|
|
The I2S state machine has been reworked to ensure transitions of the peripheral functional states. |
|
|
The HAL I2S functions were updated to return:
|
|
|
Involves redesigning the error handling mechanisms within the HAL to improve the detection, reporting, and handling of errors. |
|
|
All TypeDef parts of the HAL I2S driver have been removed and replaced by
|
|
|
Const keywords have been added to non-modifiable pointers to ensure that either the pointer itself or the data it points to cannot be modified. This enhances code safety and readability, prevents unintended modifications, and renders code more robust and maintainable. |
|
|
The parameters and state are checked using
|
|
|
Merge HAL extension files with common ones and remove the EX prefix from APIs. |
Only one HAL I2S header file remains and all macros, define statements, and functions from
|
|
Provide RTOS-compatible acquire/release bus services for communication peripheral drivers. |
New functions,
|
|
Add HAL PPP Services for Drivers with Handle to Retrieve Corresponding Peripheral Clock Frequency. |
HAL I2S provides new API to retrieve clock frequency
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including I2S instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
All HAL I2S functions start with
|
Other HAL I2S changes ¶
|
Concept |
Consideration |
|---|---|
|
Add Pause and Resume features in IT mode |
Introduce
|